package com.bjsxt.userscenter.common.util;

import java.util.Random;

/**
 * 正则表达式
 * @author wangshSxt
 *
 */
public class RegexUtil
{
	public String allStr = "abcdefghijklmnopqrstuvwxyz0123456789";
	
	/**
	 * 生成随机数
	 * @param length	指定长度
	 * @return	返回随机数
	 */
	public String proccedStr(int length)
	{
		StringBuffer sb = new StringBuffer();
		Random random = new Random();
		for(int i = 0 ; i < length ; i ++)
		{
			int randInt = random.nextInt(allStr.length());
			char ch = allStr.charAt(randInt);
			sb.append(ch);
		}
		return sb.toString() ; 
	}
}
